package com.bh.ledger.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntityNoCode;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 台帐明细对象 jc_ledger_detail
 *
 * @author slx
 * @date 2023-06-23
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "客户台帐明细对象", description = "客户台帐明细对象")
@Data
public class JcCustomerLedgerDetail extends BhtmsBaseEntityNoCode implements Serializable {
    
    

    /**
     * 金额
     */
    @ApiModelProperty("金额")
    @Excel(name = "金额")
    private BigDecimal amount;

    /**
     * 税金
     */
    @ApiModelProperty("税金")
    @Excel(name = "税金")
    private BigDecimal input;


    /**
     * 费用类型
     */
    @Dict(dictTable = "jc_fee_type", dictLabel = "name", dictValue = "id", dictAlias = "jcFeeTypeIdDtLabel")
    @ApiModelProperty("费用类型")
    @Excel(name = "费用类型")
    private Long jcFeeTypeId;
    private String jcFeeTypeIdDtLabel;

    /**
     * 发生时间
     */
    @ApiModelProperty("发生时间")
    @Excel(name = "发生时间")
    private String occurrenceTime;

    /**
     * 税率
     */
    @ApiModelProperty("税率")
    @Excel(name = "税率")
    private BigDecimal taxrate = BigDecimal.valueOf(0.09);

   
    private Long jcLedgerId;

    /**
     * 台账类型(正常(自动0)、调整(手动1))
     */
    @ApiModelProperty("台账类型(正常(自动0)、调整(手动1))")
    @Excel(name = "台账类型(正常(自动0)、调整(手动1))")
    private Integer category;

    /**
     * 单据类型(订单、运单,0 订单 1 运单 2 派车单 4 费用传递,3 其他费用)
     */
    @ApiModelProperty("单据类型(订单、运单,0 订单 1 运单 2 派车单 4 费用传递,3 其他费用)")
    @Excel(name = "单据类型(订单、运单,0 订单 1 运单 2 派车单 4 费用传递,3 其他费用)")
    private Integer type;

    /**
     * 客户ID
     */
    @ApiModelProperty(value = "客户ID")
    private Long jcCustomerId;

    /**
     * 订单ID
     */
    @ApiModelProperty("订单ID")
    @Excel(name = "订单ID")
    private Long jcOrderId;

    /**
     * 运单ID
     */
    @ApiModelProperty("运单ID")
    @Excel(name = "运单ID")
    private Long jcShipmentId;

    /**
     * 其他费用
     */
    @ApiModelProperty("其他费用")
    @Excel(name = "其他费用")
    private String jcOtherfeeId;

    /**
     * 到付
     */
    @ApiModelProperty("到付")
    @Excel(name = "到付")
    private BigDecimal arrivePay = BigDecimal.ZERO;

    /**
     * 核销金额
     */
    @ApiModelProperty("核销金额")
    @Excel(name = "核销金额")
    private BigDecimal hxmoney = BigDecimal.ZERO;

    /**
     * 未核销金额
     */
    @ApiModelProperty("未核销金额")
    @Excel(name = "未核销金额")
    private BigDecimal whmoney = BigDecimal.ZERO;

    /**
     * 余额
     */
    @ApiModelProperty("余额")
    @Excel(name = "余额")
    private BigDecimal yuE = BigDecimal.ZERO;

    /**
     * 总费用
     */
    @ApiModelProperty("总费用")
    @Excel(name = "总费用")
    private BigDecimal zFy = BigDecimal.ZERO;

    /**
     * 总干线运费
     */
    @ApiModelProperty("总干线运费")
    @Excel(name = "总干线运费")
    private BigDecimal zGxyf = BigDecimal.ZERO;

    /**
     * 总其他费用
     */
    @ApiModelProperty("总其他费用")
    @Excel(name = "总其他费用")
    private BigDecimal zQtfy = BigDecimal.ZERO;

    /**
     * 总送货费
     */
    @ApiModelProperty("总送货费")
    @Excel(name = "总送货费")
    private BigDecimal zShf = BigDecimal.ZERO;

    /**
     * 总提货费
     */
    @ApiModelProperty("总提货费")
    @Excel(name = "总提货费")
    private BigDecimal zThf = BigDecimal.ZERO;

    /**
     * 押金
     */
    @ApiModelProperty("押金")
    @Excel(name = "押金")
    private BigDecimal yajin = BigDecimal.ZERO;

    /**
     * 预收油卡
     */
    @ApiModelProperty("预收油卡")
    @Excel(name = "预收油卡")
    private BigDecimal yfYouka = BigDecimal.ZERO;

    /**
     * 收入
     */
    @ApiModelProperty("收入")
    @Excel(name = "收入")
    private BigDecimal income = BigDecimal.ZERO;

    /**
     * 成本
     */
    @ApiModelProperty("成本")
    @Excel(name = "成本")
    private BigDecimal outcome = BigDecimal.ZERO;

    /**
     * 承运商ID
     */
    @Dict(dictTable = "jc_carrier", dictLabel = "name", dictValue = "id")
    @ApiModelProperty("承运商ID")
    @Excel(name = "承运商ID")
    private Long jcCarrierId;

    /**
     * 确认时间
     */
    @ApiModelProperty("确认时间")
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date affirmTime;

    /**
     * 收入成本确认(确认1,未确认0)
     */
    @ApiModelProperty("收入成本确认(确认1,未确认0)")
    @Excel(name = "收入成本确认(确认1,未确认0)")
    private Integer isConfirm;

    /**
     * 收款方式
     */
    @ApiModelProperty("收款方式")
    @Excel(name = "收款方式")
    private String collectMethod;
    @TableField(exist = false)
    private String collectMethodLabel; //收款方式

    /**
     * 结算方式
     */
    @ApiModelProperty("结算方式")
    @Excel(name = "结算方式")
    private String settlementMethod;
    @TableField(exist = false)
    private String settlementMethodLabel;//结算方式

    /**
     * 支付方式
     */
    @ApiModelProperty("支付方式")
    @Excel(name = "支付方式")
    private String payMethod;


    private String jcShipmentCode;
    private String jcOrderCode;
    private String jcCustomerName;
    private String jcFeeTypeName;
}
